﻿@using DIS.Infrastructure.Entities.Entity;
@{
    ViewBag.Title = "住宿费";
    Layout = "~/Views/Shared/_Layout.cshtml";
    ItemListBox<HotelFee> feelist = ViewBag.feelist;
}

<table width="98%" border="0" align="center" cellpadding="2" cellspacing="1" bgcolor="#D6D6D6">
    <tr>
        <td height="27" colspan="9" background="/content/img/tbg.gif" bgcolor="#E7E7E7">
            <table width="96%" border="0" cellspacing="1" cellpadding="1">
                <tr>
                    <td width="24%" style="padding-left: 10px;">
                        <b>住宿费列表</b>
                    </td>
                    <td width="76%" align="right">
                        <b><a href="/Reimbursement/HotelFeeDetail"><u>新增住宿费</u></a> </b>
                    </td>
                </tr>
            </table>
        </td>
    </tr>
    <tr bgcolor="#FBFCE2">
        <td width="10%" height="24" align="center">
            年月
        </td>
        <td width="10%" height="24" align="center">
            项目
        </td>
        <td width="10%" height="24" align="center">
            开始日期
        </td>
        <td width="10%" align="center">
            结束日期
        </td>
        <td width="5%" align="center">
            天数
        </td>
        <td width="8%" align="center">
            住宿费
        </td>
        <td width="5%" align="center">
            发票数
        </td>
        <td width="5%" align="center">
            状态
        </td>
        <td width="20%" align="center">
            操作
        </td>
    </tr>
    @{
        if (feelist != null && feelist.Data != null && feelist.Data.Any())
        {
            foreach (var item in feelist.Data)
            {
                var stateStr = "已保存";
                if (item.Status == 0)
                {
                    stateStr = "已保存";
                }
                else if (item.Status == 1)
                {
                    stateStr = "已提交";
                }
                else
                {
                    stateStr = "已锁定";
                }
              
        <tr bgcolor="#FFFFFF" align="center" class="hover">
            <td width="10%">@(item.Year)年@(item.Month)月
            </td>
            <td width="10%" align="center">@item.project.ProjectName
            </td>
            <td width="10%" height="24" align="center">@item.StartDate
            </td>
            <td width="10%" align="center">@item.EndDate
            </td>
            <td width="5%" align="center">@item.TotalDays
            </td>
            <td width="8%" align="center">@item.TotalFee
            </td>
            <td width="5%" align="center">@item.InvoiceCount
            </td>
            <td width="5%" align="center">@stateStr
            </td>
            <td>
                <a href="/Reimbursement/HotelFeeDetail?Id=@item.Id"  ><u>详情</u></a> | <a href="/Reimbursement/ChangeHotelFeeState?Id=@item.Id&page=@feelist.CurrentPage&state=1">
                    <u>提交</u></a> | <a href="/Reimbursement/ChangeHotelFeeState?Id=@item.Id&page=@feelist.CurrentPage&state=2"><u>锁定</u></a> | <a href="/Reimbursement/ChangeHotelFeeState?Id=@item.Id&page=@feelist.CurrentPage&state=-1" class='confirmdel'><u>删除</u></a>
            </td>
        </tr>
            }
        }
    }
    <tr bgcolor="#F9FCEF">
        <td colspan="9" align="right">@Html.Raw(feelist.PageItemSegment)
        </td>
    </tr>
</table>
